package com.drinkdelivery.common.domain;


import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.drinkdelivery.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.Date;

@Data
@ApiModel(description = "轮播图实体类")
@TableName("slider_image")
public class SliderImage {

    private static final long serialVersionUID = 1L;

    /** 分类ID，主键，*/

    @TableId
    private Long id;

    /** 分类名称 */
    @ApiModelProperty(value = "图片名称")
    @Excel(name = "图片名称")
    @NotBlank(message = "请先填写图片名称")
    private String imageName;

    /** 分类描述 */
    @ApiModelProperty(value = "图片链接")
    @Excel(name = "图片链接")
    @NotBlank(message = "请先上传Url")
    private String imageUrl;

    @ApiModelProperty(value = "排序字段")
    private Integer sort;

    @ApiModelProperty(value = "逻辑删除标记，0-未删除，1-已删除")
    @Excel(name = "逻辑删除标记，0-未删除，1-已删除")
    private Integer isDeleted;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新时间")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    @ApiModelProperty(value = "商户id")
    private  Integer merchantId;
}
